package day01;

public class Xiancheng3 {
	//方式三：匿名内部类
	//好处：方法简单
	//坏处:代码重用性差
	public static void main(String[] agrs) {
		Thread r= new Thread() {
			public void run() {
				for(int i=0;i<10;i++) {
					System.out.println("askhbdsakld");
				}
			}
		};			
		Thread r2=new Thread(new Runnable() {			
			public void run() {
				for(int i=0;i<10;i++) {
					System.out.println("fyg");
				}				
			}			
		});
		r.start();
		r2.start();
	}
}
